import axios from '@/utils/axios';

export const getCoreIndex = (params) => {
    return axios.request({
        url: '/stat/core-index',
        method: 'get',
        params
    });
};

export const getSalePage = (params) => {
    return axios.request({
        url: '/stat/core-index/sale/page',
        method: 'get',
        params
    });
};

export const getHotCountryRankList = (params) => {
    return axios.request({
        url: '/webfunny/analysis/hot/country',
        method: 'get',
        params
    });
};

export const getHotGoodsSaleRankList = (params) => {
    return axios.request({
        url: '/webfunny/analysis/hot/goods',
        method: 'get',
        params
    });
};

// export const getProductDetailScanList = (params) => {
//     return axios.request({
//         url: '/webfunny/analysis/product-detail-scan',
//         method: 'get',
//         params
//     });
// };
export const getProductDetailScanList = (params) => {
    return axios.request({
        url: '/webfunny/analysis/product-detail-scan',
        method: 'get',
        params
    });
};
export const getProductAddCartList = (params) => {
    return axios.request({
        url: '/webfunny/analysis/product-add-cart',
        method: 'get',
        params
    });
};

export const getHotSearchKeywordRankList = (params) => {
    return axios.request({
        url: '/webfunny/analysis/hot/keyword',
        method: 'get',
        params
    });
};

export const getOrderAmountData = (params) => {
    return axios.request({
        url: '/webfunny/analysis/order-average-amount',
        method: 'get',
        params
    });
};

export const getOrderCountData = (params) => {
    return axios.request({
        url: '/webfunny/analysis/order-average-count',
        method: 'get',
        params
    });
};

export const getConversionFunnel = (params) => {
    return axios.request({
        url: '/webfunny/analysis/conversion/funnel',
        method: 'get',
        params
    });
};

export const getIpCountryList = (params) => {
    return axios.request({
        url: '/webfunny/analysis/ip/country',
        method: 'get',
        params
    });
};

export const getRepurchaseRateData = (params) => {
    return axios.request({
        url: '/webfunny/analysis/repurchase-data',
        method: 'get',
        params
    });
};
export const getPayTypePieData = (params) => {
    return axios.request({
        url: '/webfunny/analysis/pay-type-data',
        method: 'get',
        params
    });
};

export const getOrderSourcePieData = (params) => {
    return axios.request({
        url: '/webfunny/analysis/order-source-data',
        method: 'get',
        params
    });
};

export const getMemberSourcePieData = (params) => {
    return axios.request({
        url: '/webfunny/analysis/member-source-data',
        method: 'get',
        params
    });
};
